package bullets;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

public class HeroBullet extends Bullet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6200001157412556433L;
	private static BufferedImage image;
	protected int heroFlag=0;
	static {
		image = readImage("src/images/heroBullet.png");
	}
	
	public HeroBullet() {
		super();
		
	}
	public HeroBullet(int bulletSpeed) {
		this.width=28;
		this.height=65;
		this.speed=-bulletSpeed;
	}
	public HeroBullet(int x,int y,int bulletSpeed,int heroFlag) {
		this(bulletSpeed);
		this.x=x;
		this.y=y;
		this.heroFlag = heroFlag;
	}

	@Override
	public void step() {
		y+=speed;
	}
	public void setBulletX(int x) {
		this.x=x;
	}
	public void setBulletY(int y) {
		this.y=y;
	}
	public int getHeroFlag() {
		return heroFlag;
	}
	public void setHeroFlag(int heroFlag) {
		this.heroFlag = heroFlag;
	}
	@Override
	public void paintImage(Graphics g) {
		g.drawImage(image, x, y,null);	
	}
	public String toString() {
		return "Bullet [x=" + x + ", y=" + y + ", status=" + status + "]";
	}
}
